/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.ambassadorrewards.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.ambassadorrewards.entity.AmbassadorRewards;
import com.jeeplus.modules.ambassadorrewards.mapper.AmbassadorRewardsMapper;

/**
 * 大使奖励Service
 * @author zhych
 * @version 2021-11-19
 */
@Service
@Transactional(readOnly = true)
public class AmbassadorRewardsService extends CrudService<AmbassadorRewardsMapper, AmbassadorRewards> {

	public AmbassadorRewards get(String id) {
		return super.get(id);
	}
	
	public List<AmbassadorRewards> findList(AmbassadorRewards ambassadorRewards) {
		return super.findList(ambassadorRewards);
	}
	
	public Page<AmbassadorRewards> findPage(Page<AmbassadorRewards> page, AmbassadorRewards ambassadorRewards) {
		return super.findPage(page, ambassadorRewards);
	}
	
	@Transactional(readOnly = false)
	public void save(AmbassadorRewards ambassadorRewards) {
		super.save(ambassadorRewards);
	}
	
	@Transactional(readOnly = false)
	public void delete(AmbassadorRewards ambassadorRewards) {
		super.delete(ambassadorRewards);
	}

	/**
	 * 大使奖励记录添加
	 * @param ambassadorRewards 奖励记录
	 */
	@Transactional(readOnly = false, rollbackFor = Exception.class)
	public void reward(AmbassadorRewards ambassadorRewards) {
		super.save(ambassadorRewards);
	}
}